-- @owner: lvlintao
-- @date: 2025-11-18
-- @testpoint: D兼容性-在事务中使用测试，部分测试点合理报错
@connect PrimaryDbDmode;
--step1 建表指定数据类型;expect:成功
create table case0005(col1 int, col2 nvarchar(max), col3 nvarchar(50), col4 nvarchar, col nvarchar2(max), col6 nvarchar2(50), col7 nvarchar2);

---step2 查看表定义;expect:成功
SELECT
  column_name AS "colname",
  data_type AS "datatype",
  is_nullable AS "isnull",
  column_default AS "default",
  ordinal_position AS "ordinal"
FROM information_schema.columns
WHERE
  table_schema = 'public'
  AND table_name = 'case0005';

--step3 在事务中插入查询;expect:合理报错
begin;/
insert into case0005 values(1, 'abcd', 'abcd', 'a', 'abcd','abcd','a');
select * from case0005;
--error
insert into case0005(col4) values('abcd');
--error
insert into case0005(col7) values('abcd');
end;
--step4 清理环境;expect:成功
drop table if exists case0005;




